package com.zjx.mapper;

//import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zjx.entity.Student;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author zhaojiaxu
 * @date 2021/08/25 10:09
 **/
public class StudentRowMapper implements RowMapper<Student> {

	@Override
	public Student mapRow(ResultSet set, int index) throws SQLException {
		Student student = new Student(set.getInt("id"),set.getString("name"),set.getInt("age"),set.getString("sex"));
		return student;
	}
}

